<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="./js/jquery.min.js"></script>
</head>
<body>
  <h1>演示发送跨域Ajax请求,浏览器同源策略拦截服务器的请求</h1>
  <h1>跨域地址http://127.0.0.1:8888/getData</h1>
  <script>
    $.ajax({
      url:"http://127.0.0.1:8888/getData",
      data:"",
      type:"get",
      dataType:"text",
      success:function(data){
        console.log(data);
      },
    });
  </script>
</body>
</html>